import 'package:amway_superapp_creator_plugin/net/http_manager.dart';
import 'package:amway_superapp_creator_plugin/viewmodels/base_model.dart';
import 'package:flutter/cupertino.dart';

import '../api.dart';
import '../view_state.dart';

class CreateSplashViewModel extends BaseModel {
  CreateSplashViewModel({@required Api api}) : super(api: api);

  String _privacyLink;

  String get privacyLink => _privacyLink;

  set privacyLink(String value) {
    _privacyLink = value;
    notifyListeners();
  }

  void queryprivacyLink() {
    setState(ViewState.Busy);
    HttpManager().get(
        url: '/apis/v1/creator/public-config/getPrivacyPolicyLink',
        successCallback: (data) {
          print(data);
          setState(ViewState.Idle);
          privacyLink=data;
        }, errorCallback: (data) {
      setState(ViewState.Idle);


    }, tag: null);
  }

}